package com.haochu.novel.ui;

import java.io.FileNotFoundException;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

@SuppressLint("ClickableViewAccessibility")
public class BookContentView extends View {

	private Bitmap mCurPageBitmap, mNextPageBitmap;
	
	public BookContentView(Context context, AttributeSet attrs) throws FileNotFoundException {
		super(context, attrs);
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		canvas.save();
		canvas.drawBitmap(mCurPageBitmap, 0, 0, null);
		canvas.restore();
//		canvas.save();
//		canvas.drawBitmap(mNextPageBitmap, 0, 0, null);
//		canvas.restore();
	}

	public void setmCurPageBitmap(Bitmap mCurPageBitmap, Bitmap mNextPageBitmap) {
		this.mCurPageBitmap = mCurPageBitmap;
		this.mNextPageBitmap = mNextPageBitmap;
	}
	
	public boolean doTouchEvent(MotionEvent event) {
		
		invalidate();
		
		return true;
	}

	
}
